-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update toml library to v2 #272
Conversation
Thatnks @GreyXor, but if the parses have different behaviour and the existing tests fail, that'll break backwards compatibility. If that's the case, then the |
Thanks, I can confirm that this breaks backward compatibility. Should I move it into a subdirectory called |
Yep, in that case, it should be Line 1 in 6c6c498
|
Here it is, toml/v2 in a subdirectory |
There should be no You should make the necessary changes to the |
I understood that:
If a v2 subfolder doesn't suit you, where should I put it? |
The current version already exists in the repo with a specific tag. You update the files to the new version and add In the directory structure, there should also be the latest "version" (state) of the file. There shouldn't be subdirectories with different versions. |
Thanks, I've deleted the v2 subfolder and parser/toml is now the v2. |
Thanks @GreyXor. Will review and merge by this weekend. |
Also, let's update the following:
|
Thank you, i've done the two first bullets points from your list. Would you like a complete new test in a new file ? Or just a test directly in |
https://github.com/knadh/koanf/blob/master/tests/koanf_test.go#L282-L288 Maybe we can just add a new case with tomlv2 as the parser? import(
...
tomlv2 "github.com/knadh/koanf/parsers/toml/v2"
...
) |
Once this is done, we can go ahead and merge. |
Thanks, I rebased on master |
I've revised the TOML parser to make it compatible with the v2 of go-toml.
It appears that this updated version parses differently; specifically, it no longer includes spaces in subgroups and only returns nil if the map is empty(look at the tests to see the difference).
Please tell me if there are any additions or modifications required.